package com.fuershiye.woman.monitor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fuershiye.woman.monitor.dao.admin.PermissionDao;
import com.fuershiye.woman.monitor.model.Permission;
import com.fuershiye.woman.monitor.service.PermissionService;

@Service("permissionService")
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionDao permissionDao;

    @Override
    public Permission findByName(String username) {
        return permissionDao.findByName(username);
    }
    
    @Override
    public void save(Permission permission) {
        permissionDao.save(permission);
    }

    @Override
    public List<Permission> list() {
        return permissionDao.list();
    }

    @Override
    public List<Permission> listByName(String name) {
        return permissionDao.listByName(name);
    }

    @Override
    public Permission get(Long id) {
        return permissionDao.get(id);
    }

    @Override
    public void delete(Long id) {
        permissionDao.delete(id);
    }

}
